package com.lanou.service.Impl;

import com.lanou.entity.Answer;
import com.lanou.mapper.AnswerMapper;
import com.lanou.service.AnswerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName AnswerServiceImpl
 * @Description TODO
 * @Author chenzhaobao
 * @Date 2025年08月14日 10:19
 * @Version 1.0
 */
@Service
public class AnswerServiceImpl implements AnswerService {
    @Autowired
    private AnswerMapper answerMapper;
    @Override
    public int insert(Answer answer) {
        return answerMapper.insert(answer);
    }

    @Override
    public int deleteById(Integer id) {
        return answerMapper.deleteById(id);
    }

    @Override
    public int updateById(Answer answer) {
        return answerMapper.updateById(answer);
    }

    @Override
    public Answer selectById(Integer id) {
        return answerMapper.selectById(id);
    }

    @Override
    public List<Answer> selectAll() {
        return answerMapper.selectAll();
    }

    @Override
    public List<Answer> selectByConsultantId(Integer consultantId) {
        return answerMapper.selectByConsultantId(consultantId);
    }
}
